summaryrefslogtreecommitdiff
path: root/docs/src/pages/[...slug].astro
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/pages/[...slug].astro')
-rw-r--r--docs/src/pages/[...slug].astro19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/src/pages/[...slug].astro b/docs/src/pages/[...slug].astro
new file mode 100644
index 000000000..613e2b3d5
--- /dev/null
+++ b/docs/src/pages/[...slug].astro
@@ -0,0 +1,19 @@
+---
+export async function getStaticPaths() {
+ // get english pages that moved from `/` to `/en/`
+ const englishPages = Astro.fetchContent('./en/**/*.md');
+
+ // add pages that are `*.astro` files as well
+ const otherPages = [{ url: "/en/themes" }];
+ return [...englishPages, ...otherPages].map((page) => ({
+ params: {
+ slug: page.url.slice(4),
+ },
+ props: {
+ englishSlug: page.url,
+ }
+ }));
+}
+---
+
+<meta http-equiv="refresh" content={`0;url=${Astro.props.englishSlug}`} />